package cn.pconline.security2.authorization;

import cn.pconline.security2.authentication.Client;
import cn.pconline.security2.authentication.UserInfo;

/**
 * Copyrights 2005, Guangzhou Intellisoft ltd.
 * User: chen xiaohu
 * Date: 2005-12-9
 * Time: 14:42:09
 */
public class ACLItem {
    private UserInfo user;
	private long userId;
    private Role role;
    private Resource resource;
    private String application;
	private long accountId;

    public UserInfo getUser() {
		if (user == null) {
			user = Client.getUser(userId + "");
		}
        return user;
    }

    public void setUser(UserInfo user) {
        this.user = user;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public Resource getResource() {
        return resource;
    }

    public void setResource(Resource resource) {
        this.resource = resource;
    }

    public String getApplication() {
        return application;
    }

    public void setApplication(String application) {
        this.application = application;
    }

	public long getAccountId() {
		return accountId;
	}

	public void setAccountId(long accountId) {
		this.accountId = accountId;
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

}
